<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'ads-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data')
)); ?>

	<p class="note"></p>

	<?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'标题介绍'); ?>
        <?php echo $form->textField($model,'title',array('size'=>40,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'title'); ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'图片链接'); ?>
		<?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'url'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'图片上传'); ?>
        <input type="file" id="Ads_img" name="Ads_img">
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'广告分类'); ?>
		<?php echo $form->dropDownList($model,'cid',array('请选择广告分类','首页顶部轮播横幅[960*285]', '首页中部轮播[478*285]', '首页中部横幅[960*93]')); ?>
		<?php echo $form->error($model,'cid'); ?>
	</div>
    <?php echo $form->hiddenField($model,'type',array('value'=>0)); ?>
    <?php echo $form->hiddenField($model,'img',array('value'=>'oz')); ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '新增' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->